/*=============================================================================
#    The element-comm is a tentative program used to test our ideas.           
#                       Copyright (C)  bgao                                    
#
#     This program is free software; you can redistribute it and/or            
#      modify it under the terms of the GNU General Public License             
#     as published by the Free Software Foundation; either version 2           
#         of the License, or (at your option) any later version.               
#
#     This program is distributed in the hope that it will be useful,          
#    but WITHOUT ANY WARRANTY; without even the implied warranty of           
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            
#             GNU General Public License for more details.                    
#
#    You should have received a copy of the GNU General Public License        
#     along with this program; if not, write to the Free Software             
#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,             
#                       MA  02110-1301, USA.                                  
#==============================================================================
# $Id$ 
#
# $Author$ 
#
# $Revision$ 
#
# $Date$ 
#
# Description: 
#
=============================================================================*/
#ifndef __MINI2410_H
#define __MINI2410_H

#include "ARM/arm-common.h"

/********* LED I/O ***************/
#define PORT_LED	rGPFDAT
#define LED_GREEN 	4u //GPIO F4 - Output
#define LED_RED 	7u //GPIO F7 - Output

/********* CC2420 I/O ***********/
#define PORT_2420_VREG       rGPCDAT
#define PORT_2420_RESET      rGPCDAT
#define PORT_2420_FIFO		 rGPCDAT
#define PORT_2420_CCA		 rGPCDAT
#define VREG_EN        2  // GPIO C2 - Output: VREG_EN to CC2420
#define RESET_N        1  // GPIO C1 - Output: RESET_N to CC2420
#define CCA            3  // GPIO C3 - Input:  CCA from CC2420
#define FIFO           4  // GPIO C4 - Input: FIFO from CC2420

#define PORT_2420_CS      rGPGDAT      	
#define CSN            4  // GPIO G4 - Output: SPI Chip Select (CS_N)
#define SCK            7  // GPIO G7 - Output: SPI Serial Clock (SCLK)
#define SI             6  // GPIO G6 - Output: SPI Master out - slave in (MOSI)
#define SO             5  // GPIO G5 - Input:  SPI Master in - slave out (MISO)

#define PORT_2420_FIFOP	 rGPFDAT
#define PORT_2420_SFD	 rGPFDAT
#define SFD            2  // GPIO F2 - Input:  SFD from CC2420
#define FIFOP         1  // GPIO F1 - Input: FIFOP from CC2420



/********* SENSOR I/O ***********/


/**********S3C2410 SPI************/
#define SPI_TX_REG 		rSPTDAT1
#define SPI_RX_REG 		rSPRDAT1 
#define SPI_STATUS_REG 	rSPSTA1
#define SPI_TX_READY	0 //bit0 of SPSTA1,Transfer finish Flag



#endif

